To solve the problem of large amount of calculation and nonlinear programming in the process of service composition optimization, a Cost Benefit Coefficient (CBC) approach was proposed for Web services composition reliability optimization in the situation of a given cost investment. First, the structure patterns of service composition and related reliability function were analyzed. Furthermore, the Web service composition method of reliability calculation was proposed and a nonlinear optimization model was established accordingly. And then the cost benefit coefficient was computed through the relationship between the cost and the reliability of component services, and the optimization schemes of Web service composition were decided. According to the nonlinear optimization model, the results of optimization were computed. Finally, given cost investment, the higher reliability of the approach to optimize the reliability of Web service composition was verified through the comparison of this approach and the traditional method on the reliable data of component service. The experimental results show that the proposed algorithm is effective and reasonable for reliability optimization of Web services composition.